package data.json;

import com.google.gson.Gson;

import data.Promotion;

//https://sites.google.com/site/gson/gson-user-guide
public class JsonParserPromotion extends JsonParser<Promotion>{

	@Override
	public String jsonCreate(Promotion p) {		
		Gson gson = new Gson();
		String json = gson.toJson(p); 

		return json;
	}

	@Override
	public Promotion jsonRead(String json) 
	{			
		Gson gson = new Gson();
		Promotion p = gson.fromJson(json, Promotion.class); 

		return p;		
	}

}

